// 菜单
import request from '@/utils/request'

// 菜单列表
export function getMenuList() {
  return request({
    url: '/menus'
  })
}

// 删除菜单
export function deltMenu(id) {
  return request({
    url: `/menus/${id}`,
    method: 'DELETE'
  })
}

// 菜单详情
export function getMenusList(id) {
  return request({
    url: '/menus/' + id

  })
}
// 修改菜单
export function editMenu(data) {
  return request({
    url: `/menus/${data.id}`,
    method: 'PUT',
    data
  })
}

// 添加菜单
export function addMenu(data) {
  return request({
    url: '/menus',
    method: 'POST',
    data
  })
}
